package com.ocean.system.service.impl;

import java.util.List;
import com.ocean.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ocean.system.mapper.OTouchstoneMapper;
import com.ocean.system.domain.OTouchstone;
import com.ocean.system.service.IOTouchstoneService;
import com.ocean.common.core.text.Convert;

/**
 * 预报检验任务Service业务层处理
 * 
 * @author ocean
 * @date 2025-09-17
 */
@Service
public class OTouchstoneServiceImpl implements IOTouchstoneService 
{
    @Autowired
    private OTouchstoneMapper oTouchstoneMapper;

    /**
     * 查询预报检验任务
     * 
     * @param id 预报检验任务主键
     * @return 预报检验任务
     */
    @Override
    public OTouchstone selectOTouchstoneById(Long id)
    {
        return oTouchstoneMapper.selectOTouchstoneById(id);
    }

    /**
     * 查询预报检验任务列表
     * 
     * @param oTouchstone 预报检验任务
     * @return 预报检验任务
     */
    @Override
    public List<OTouchstone> selectOTouchstoneList(OTouchstone oTouchstone)
    {
        return oTouchstoneMapper.selectOTouchstoneList(oTouchstone);
    }

    /**
     * 新增预报检验任务
     * 
     * @param oTouchstone 预报检验任务
     * @return 结果
     */
    @Override
    public int insertOTouchstone(OTouchstone oTouchstone)
    {
        oTouchstone.setCreateTime(DateUtils.getNowDate());
        return oTouchstoneMapper.insertOTouchstone(oTouchstone);
    }

    /**
     * 修改预报检验任务
     * 
     * @param oTouchstone 预报检验任务
     * @return 结果
     */
    @Override
    public int updateOTouchstone(OTouchstone oTouchstone)
    {
        return oTouchstoneMapper.updateOTouchstone(oTouchstone);
    }

    /**
     * 批量删除预报检验任务
     * 
     * @param ids 需要删除的预报检验任务主键
     * @return 结果
     */
    @Override
    public int deleteOTouchstoneByIds(String ids)
    {
        return oTouchstoneMapper.deleteOTouchstoneByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除预报检验任务信息
     * 
     * @param id 预报检验任务主键
     * @return 结果
     */
    @Override
    public int deleteOTouchstoneById(Long id)
    {
        return oTouchstoneMapper.deleteOTouchstoneById(id);
    }

    @Override
    public List<OTouchstone> getlistpage(OTouchstone oTouchstone) {
        return oTouchstoneMapper.getlistpage(oTouchstone);
    }
}
